package com.gopay.gass.service.impl.bank;

import org.springframework.stereotype.Service;

import com.gopay.common.constants.autosettle.SettlementExchangeConstants;
import com.gopay.common.domain.bank.BcdlMessage;
import com.gopay.gass.constants.SameBank;
import com.gopay.gass.domain.GassMainOrder;
import com.gopay.gass.domain.GassOrderDtl;
import com.gopay.gass.service.impl.GassPayRequestServiceImpl;


/**
 * 超级网银汇路
 * @author lizheng
 *
 */
@Service("icbcsuperGassPayRequestService")
public class ICBCSUPERGassPayRequestServiceImpl extends GassPayRequestServiceImpl {

    protected SameBank getSameBank(String recvBankName){
        if(recvBankName.indexOf("工商") ==-1 && recvBankName.indexOf("工行")==-1){
            return SameBank.NO;
        }
        return SameBank.YES;
    }

	@Override
	protected BcdlMessage buildBcdlMessage(GassMainOrder main, GassOrderDtl dtl) {
		BcdlMessage message = super.createBaseBcdlMessage(main, dtl);
        message.setPbocBankName(getBankName());
        message.setPobcBankCode("102");
        //设置超级网银标识
        message.setEmergency(2);/* 加急标志 0加急 1不加急 2超级网银*/
        message.setSysIOFlg(1);/* 标记为跨行*/
		return message;
	}

	@Override
	protected String getBankName() {
		return "中国工商银行";
	}
}
